package com.wyp.design.pattern.structural.flyweight;

/**
 * 外部状态和内部状态：
 * 这里的depatment通过参数传递过来的，是可以变化的，属于外部状态，但是如果有一个title属性，值为部门经理 属于内部状态，不可变
 *
 * @author: Oliver
 * @time: 2020/5/16/12:04
 */
public class Manager implements Employee {
    private String title = "部门经理";
    private String department;
    private String reportContent;

    @Override
    public void report() {
        System.out.println(reportContent);
    }


    public void setReportContent(String reportContent) {
        this.reportContent = reportContent;
    }

    public Manager(String department) {
        this.department = department;
    }
}
